﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="keywords" content="UI/API/1.7/Draggable" />
		<title>UI/API/1.7/Draggable - jQuery JavaScript Library</title>
		<link rel="stylesheet" href="style/reset.css" type="text/css" />
		<link rel="stylesheet" href="style/screen.css" type="text/css" />
		<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "http://www.winswd.com/aboutme/jquery/ui/style/main.css?9"; /*]]>*/</style>

		<link rel="stylesheet" type="text/css" href="style/jquery.tabs.css" />
		<!--[if lte IE 7]>
		<link rel="stylesheet" href="style/jquery.tabs-ie.css" type="text/css" media="projection, screen"/>
		<![endif]-->

		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script src="js/jquery.tabs.js"></script>

		<script>$(function(){
			$("div[id=examples]").each(function(){
				$(this).siblings("div:first").find("div.desc").after(
					$(this).find("div.example:has(#demo):first").remove().clone());

				if ( !$("div.example", this).length )
					$(this).remove();
			});

			$("div.entry")
				.children("p").remove().end()
				.find("ul:first li").each(function(){
					if ( !$(this).parent().siblings( $("a",this).attr("href") ).length )
						$(this).remove();
				}).end()
				.not(".ui")
				.tabs();

			$("div.args > br").remove();

			$("div.example")
				.children("p").remove().end()
				.tabs();

			var keywords = "String,Number,Object,Options,Array,Function,Callback,Selector,Event,Element,Integer,Float,Boolean".split(",");

			$("td.default span, td.type").each(function(){
				var html = this.innerHTML;
				jQuery.each(keywords, function(i,key){
					html = html.replace(new RegExp(key, "ig"), "<a href='/Types#" + key + "'>" + key + "</a>");
				});
				this.innerHTML = html;
			});

			$("div[id=source]").each(function(){
				var source = $("pre", this).html()
					.replace(/<\/?a.*?>/ig, "")
					.replace(/<\/?strong.*?>/ig, "")
					.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");

				//var items = [];
				//source = source.replace(/\s*<(link|script).*?>\s\*/g, function(m){
					//items.push(m);
					//return "";
				//}).replace("</head>", items.join("") + "</head>")
				//*/

				var iframe = document.createElement("iframe");
				iframe.src = "";
				iframe.width = "100%";
				iframe.height = $(this).prev().attr("rel") || "125";
				iframe.style.border = "none";
				$(this).prev().append(iframe);


				$(window).load(function(){
					var doc = iframe.contentDocument || iframe.contentWindow.document;
					source = source
						// IE needs to wait for the script to load (?)
						.replace("$(document).ready(function(){", "window.onload = (function(){try{")
						.replace(/}\);\s*<\/sc/, "}catch(e){}});</sc")
						//.replace("http://code.jquery.com/jquery-latest.js", "http://code.jquery.com/jquery-1.3rc2.js")
						.replace("</head>", "<style>html,body{border:0; margin:0; padding:0;}</style></head>");
					doc.open();
					doc.write( source );
					doc.close();
				});

			});
		});</script>
		<script type="text/javascript" src="js/custom.js"></script>
		<!--[if lt IE 5.5000]><style type="text/css">@import "http://www.winswd.com/aboutme/jquery/ui/style/IE50Fixes.css";</style><![endif]-->
		<!--[if IE 5.5000]><style type="text/css">@import "http://www.winswd.com/aboutme/jquery/ui/style/IE55Fixes.css";</style><![endif]-->
		<!--[if IE 6]><style type="text/css">@import "http://www.winswd.com/aboutme/jquery/ui/style/IE60Fixes.css";</style><![endif]-->
		<!--[if IE 7]><style type="text/css">@import "http://www.winswd.com/aboutme/jquery/ui/style/IE70Fixes.css?1";</style><![endif]-->
		<!--[if lt IE 7]><script type="text/javascript" src="http://www.winswd.com/aboutme/jquery/ui/style/IEFixes.js"></script>
		<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
		
		<!-- Head Scripts -->
			</head>
	<body id="jq-interior"  class="mediawiki ns-0 ltr">


<!-- Copyright � 2005. Spidersoft Ltd -->
<style>
A.applink:hover {border: 2px dotted #DCE6F4;padding:2px;background-color:#ffff00;color:green;text-decoration:none}
A.applink       {border: 2px dotted #DCE6F4;padding:2px;color:#2F5BFF;background:transparent;text-decoration:none}
A.info          {color:#2F5BFF;background:transparent;text-decoration:none}
A.info:hover    {color:green;background:transparent;text-decoration:underline}
</style>




	<div id="jq-siteContain">
			<div id="jq-content" class="jq-clearfix">

				<div id="jq-interiorNavigation">
					<div class='jq-portlet' id='jq-p-Getting-Started'>
						<h5></h5>
						<div class='jq-pBody'>
							<ul>
								<li id="jq-ui-doc-n-Draggable"><a href="Draggable.html">Draggable</a></li>
								<li id="jq-ui-doc-n-Droppable"><a href="Droppable.html">Droppable</a></li>				
								<li id="jq-ui-doc-n-Resizable"><a href="Resizable.html">Resizable</a></li>
								<li id="jq-ui-doc-n-Selectable"><a href="Selectable.html">Selectable</a></li>
								<li id="jq-ui-doc-n-Sortable"><a href="Sortable.html">Sortable</a></li>
							</ul>				
						</div>
					</div>
						<div class='jq-portlet' id='jq-p-API-Reference'>
						<h5>部件</h5>
						<div class='jq-pBody'>
							<ul>
								<li id="jq-ui-doc-n-Accordion"><a href="Accordion.html">Accordion</a></li>
								<li id="jq-ui-doc-n-Datepicker"><a href="Datepicker.html">Datepicker</a></li>				
								<li id="jq-ui-doc-n-Dialog"><a href="Dialog.html">Dialog</a></li>
								<li id="jq-ui-doc-n-Progressbar"><a href="Progressbar.html">Progressbar</a></li>
								<li id="jq-ui-doc-n-Slider"><a href="Slider.html">Slider</a></li>
								<li id="jq-ui-doc-n-Tabs"><a href="Tabs.html">Tabs</a></li>
							</ul>
						</div>
					</div>
						<div class='jq-portlet' id='jq-p-Plugins'>
				
						<h5>动画</h5>
						<div class='jq-pBody'>
							<ul>
								<li id="jq-ui-doc-n-AddClass"><a href="AddClass.html">AddClass</a></li>
								<li id="jq-ui-doc-n-RemoveClass"><a href="RemoveClass.html">RemoveClass</a></li>
                                <li id="jq-ui-doc-n-Animate"><a href="Animate.html">Animate</a></li>
                                <li id="jq-ui-doc-n-Effect"><a href="Effect.html">Effect</a></li>
                                <li id="jq-ui-doc-n-Hide"><a href="Hide.html">Hide</a></li>
                                <li id="jq-ui-doc-n-Show"><a href="Show.html">Show</a></li>
                                <li id="jq-ui-doc-n-SwitchClass"><a href="SwitchClass.html">SwitchClass</a></li>
                                <li id="jq-ui-doc-n-Toggle"><a href="Toggle.html">Toggle</a></li>
                                <li id="jq-ui-doc-n-ToggleClass"><a href="ToggleClass.html">ToggleClass</a></li>
							</ul>
						</div>				
					</div>					
				</div><!-- /#interiorNavigation -->

				<div id="jq-primaryContent">
		<div id="column-content">
	<div id="docs-content">
		<a name="top" id="top"></a>
				<h1 class="firstHeading">UI/API/1.7/Selectable</h1>
		<div id="bodyContent">
<!-- start content -->



<ul class="UIAPIPlugin-toc">
<li><a href="#overview">概述</a></li>
<li><a href="#options">参数</a></li>
<li><a href="#events">事件</a></li>
<li><a href="#methods">方法</a></li>
<li><a href="#theming">主题</a></li>
</ul>
<div class="UIAPIPlugin">
  <h1>jQuery UI Selectable</h1>
  <div id="overview">
    <h2 class="top-header">概述</h2>
    <div id="overview-main">
        <p>jQuery UI Selectable 插件允许一个元素被鼠标划出的选择区域选中. 同样, 元素也可以被点击选中或者同时按住 Ctrl/Meta键, 允许多个(非连续)的选择.</p>
    </div>
    <div id="overview-dependencies">
        <h3>其他附加文件</h3>
        <ul>
<li>UI Core</li>
</ul>
    </div>
    <div id="overview-example">
        <h3>示例</h3>
        <div id="overview-example" class="example">
<ul><li><a href="#demo"><span>代码示范</span></a></li><li><a href="#source"><span>查看源文件</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="">
一个简单的 jQuery UI Selectable.<br />
</p>
<pre>$(&quot;#selectable&quot;).selectable();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;link type=&quot;text/css&quot; href=&quot;themes/base/ui.all.css&quot; rel=&quot;stylesheet&quot; /&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.min.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;ui/ui.core.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;ui/ui.selectable.js&quot;&gt;&lt;/script&gt;
  &lt;style type=&quot;text/css&quot;&gt;
  #feedback { font-size: 1.4em; }
  #selectable .ui-selecting { background: #FECA40; }
  #selectable .ui-selected { background: #F39814; color: white; }
  #selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
  #selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
  &lt;/style&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
    $(&quot;#selectable&quot;).selectable();
  });
  &lt;/script&gt;
&lt;/head&gt;
&lt;body style="font-size:62.5%;"&gt;

&lt;ol id=&quot;selectable&quot;&gt;
  &lt;li class=&quot;ui-widget-content&quot;&gt;Item 1&lt;/li&gt;
  &lt;li class=&quot;ui-widget-content&quot;&gt;Item 2&lt;/li&gt;
  &lt;li class=&quot;ui-widget-content&quot;&gt;Item 3&lt;/li&gt;
  &lt;li class=&quot;ui-widget-content&quot;&gt;Item 4&lt;/li&gt;
  &lt;li class=&quot;ui-widget-content&quot;&gt;Item 5&lt;/li&gt;
  &lt;li class=&quot;ui-widget-content&quot;&gt;Item 6&lt;/li&gt;
  &lt;li class=&quot;ui-widget-content&quot;&gt;Item 7&lt;/li&gt;
&lt;/ol&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p></div>
</p><p></div>
    </div>
  </div>
  <div id="options">
    <h2 class="top-header">参数</h2>
    <ul class="options-list">
      
<li class="option" id="option-autoRefresh">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-autoRefresh">autoRefresh</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">Boolean</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">true</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>这个确定每个选择操作开始时如何刷新(重新计算)每个选择项的位置和大小. 如果你有很多很多选项, 你应当设置此项为false并且手动调用refresh方法.</p>
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>autoRefresh</code>参数初始化一个selectable.
</dt>
<dd>
<pre><code>$('.selector').selectable({ autoRefresh: false });</code></pre>
</dd>

    
<dt>
  在初始化后设置或者获取<code>autoRefresh</code>参数.
</dt>
<dd>
<pre><code>//获取
var autoRefresh = $('.selector').selectable('option', 'autoRefresh');
//设置
$('.selector').selectable('option', 'autoRefresh', false);</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="option" id="option-cancel">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-cancel">cancel</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">Selector</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">':input,option'</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>如果你使用了匹配选择器,符合匹配的元素将被禁止可选.</p>
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>cancel</code>参数初始化一个selectable.
</dt>
<dd>
<pre><code>$('.selector').selectable({ cancel: ':input,option' });</code></pre>
</dd>

    
<dt>
  在初始化后设置或者获取<code>cancel</code>参数.
</dt>
<dd>
<pre><code>//获取
var cancel = $('.selector').selectable('option', 'cancel');
//设置
$('.selector').selectable('option', 'cancel', ':input,option');</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="option" id="option-delay">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-delay">delay</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">Integer</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">0</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>定义需要经过多少毫秒后选择才会开始. 这可以预防意外的点击造成元素被选择.</p>
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>delay</code>参数初始化一个selectable.
</dt>
<dd>
<pre><code>$('.selector').selectable({ delay: 20 });</code></pre>
</dd>

    
<dt>
  在初始化后设置或者获取<code>delay</code>参数.
</dt>
<dd>
<pre><code>//获取
var delay = $('.selector').selectable('option', 'delay');
//设置
$('.selector').selectable('option', 'delay', 20);</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="option" id="option-distance">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-distance">distance</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">Integer</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">0</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>定义需要移动多少个像素选择才会开始. 如果指定了该项, 选择不会马上开始,而是会在鼠标移动了指定像素的距离之后才会开始.</p>
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>distance</code>参数初始化一个selectable.
</dt>
<dd>
<pre><code>$('.selector').selectable({ distance: 20 });</code></pre>
</dd>

<dt>
  在初始化后设置或者获取<code>distance</code>参数.
</dt>
<dd>
<pre><code>//获取
var distance = $('.selector').selectable('option', 'distance');
//设置
$('.selector').selectable('option', 'distance', 20);</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="option" id="option-filter">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-filter">filter</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">Selector</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">'*'</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>匹配子元素中那些符合条件的元素才可以被选择.</p>
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>filter</code>参数初始化一个selectable.
</dt>
<dd>
<pre><code>$('.selector').selectable({ filter: 'li' });</code></pre>
</dd>

    
<dt>
  在初始化后设置或者获取<code>filter</code>参数.
</dt>
<dd>
<pre><code>//获取
var filter = $('.selector').selectable('option', 'filter');
//设置
$('.selector').selectable('option', 'filter', 'li');</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="option" id="option-tolerance">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-tolerance">tolerance</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">String</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">'touch'</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>指定选择的模式,允许使用的值: 'touch', 'fit'.</p>
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>tolerance</code>参数初始化一个selectable.
</dt>
<dd>
<pre><code>$('.selector').selectable({ tolerance: 'fit' });</code></pre>
</dd>

    
<dt>
  在初始化后设置或者获取<code>tolerance</code>参数.
</dt>
<dd>
<pre><code>//获取
var tolerance = $('.selector').selectable('option', 'tolerance');
//设置
$('.selector').selectable('option', 'tolerance', 'fit');</code></pre>
</dd>

    </dl>
  </div>
</li>

    </ul>
  </div>
  <div id="events">
    <h2 class="top-header">事件</h2>
    <ul class="events-list">
      
<li class="event" id="event-selected">
  <div class="event-header">
    <h3 class="event-name"><a href="#event-selected">selected</a></h3>
    <dl>
      <dt class="event-type-label">类型:</dt>
        <dd class="event-type">selected</dd>
    </dl>
  </div>
  <div class="event-description">
    <p>这个事件会在任何可选的选项选择结束后触发.</p>
  </div>
  <div class="event-examples">
    <h4>代码示例</h4>
    <dl class="event-examples-list">
    
<dt>
  提供一个回调函数对<code>selected</code>事件进行操作.
</dt>
<dd>
<pre><code>$('.selector').selectable({
   selected: function(event, ui) { ... }
});</code></pre>
</dd>

    
<dt>
  使用<code>selected</code>类型来绑定<code>selected</code>事件.
</dt>
<dd>
<pre><code>$('.selector').bind('selected', function(event, ui) {
  ...
});</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="event" id="event-selecting">
  <div class="event-header">
    <h3 class="event-name"><a href="#event-selecting">selecting</a></h3>
    <dl>
      <dt class="event-type-label">类型:</dt>
        <dd class="event-type">selecting</dd>
    </dl>
  </div>
  <div class="event-description">
    <p>这个事件会在任何可选的选项被选中时触发.</p>
  </div>
  <div class="event-examples">
    <h4>代码示例</h4>
    <dl class="event-examples-list">
    
<dt>
  提供一个回调函数对<code>selecting</code>事件进行操作.
</dt>
<dd>
<pre><code>$('.selector').selectable({
   selecting: function(event, ui) { ... }
});</code></pre>
</dd>

    
<dt>
  使用<code>selecting</code>类型来绑定<code>selecting</code>事件.
</dt>
<dd>
<pre><code>$('.selector').bind('selecting', function(event, ui) {
  ...
});</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="event" id="event-start">
  <div class="event-header">
    <h3 class="event-name"><a href="#event-start">start</a></h3>
    <dl>
      <dt class="event-type-label">类型:</dt>
        <dd class="event-type">selectablestart</dd>
    </dl>
  </div>
  <div class="event-description">
    <p>这个事件在选择操作开始之前触发.</p>
  </div>
  <div class="event-examples">
    <h4>代码示例</h4>
    <dl class="event-examples-list">
    
<dt>
  提供一个回调函数对<code>start</code>事件进行操作.
</dt>
<dd>
<pre><code>$('.selector').selectable({
   start: function(event, ui) { ... }
});</code></pre>
</dd>

    
<dt>
  使用<code>selectablestart</code>类型来绑定<code>start</code>事件.
</dt>
<dd>
<pre><code>$('.selector').bind('selectablestart', function(event, ui) {
  ...
});</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="event" id="event-stop">
  <div class="event-header">
    <h3 class="event-name"><a href="#event-stop">stop</a></h3>
    <dl>
      <dt class="event-type-label">类型:</dt>
        <dd class="event-type">selectablestop</dd>
    </dl>
  </div>
  <div class="event-description">
    <p>这个选项在选择操作停止时触发.</p>
  </div>
  <div class="event-examples">
    <h4>代码示例</h4>
    <dl class="event-examples-list">
    
<dt>
  提供一个回调函数对<code>stop</code>事件进行操作.
</dt>
<dd>
<pre><code>$('.selector').selectable({
   stop: function(event, ui) { ... }
});</code></pre>
</dd>

    
<dt>
  使用<code>selectablestop</code>类型来绑定<code>stop</code>事件.
</dt>
<dd>
<pre><code>$('.selector').bind('selectablestop', function(event, ui) {
  ...
});</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="event" id="event-unselected">
  <div class="event-header">
    <h3 class="event-name"><a href="#event-unselected">unselected</a></h3>
    <dl>
      <dt class="event-type-label">类型:</dt>
        <dd class="event-type">unselected</dd>
    </dl>
  </div>
  <div class="event-description">
    <p>这个事件在任何被选中项取消选择结束后触发.</p>
  </div>
  <div class="event-examples">
    <h4>代码示例</h4>
    <dl class="event-examples-list">
    
<dt>
  提供一个回调函数对<code>unselected</code>事件进行操作.
</dt>
<dd>
<pre><code>$('.selector').selectable({
   unselected: function(event, ui) { ... }
});</code></pre>
</dd>

    
<dt>
  使用<code>unselected</code>类型来绑定<code>unselected</code>事件.
</dt>
<dd>
<pre><code>$('.selector').bind('unselected', function(event, ui) {
  ...
});</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="event" id="event-unselecting">
  <div class="event-header">
    <h3 class="event-name"><a href="#event-unselecting">unselecting</a></h3>
    <dl>
      <dt class="event-type-label">类型:</dt>
        <dd class="event-type">unselecting</dd>
    </dl>
  </div>
  <div class="event-description">
    <p>这个事件在任何被选中项取消选择时触发.</p>
  </div>
  <div class="event-examples">
    <h4>代码示例</h4>
    <dl class="event-examples-list">
    
<dt>
  提供一个回调函数对<code>unselecting</code>事件进行操作.
</dt>
<dd>
<pre><code>$('.selector').selectable({
   unselecting: function(event, ui) { ... }
});</code></pre>
</dd>

    
<dt>
  使用<code>unselecting</code>类型来绑定<code>unselecting</code>事件.
</dt>
<dd>
<pre><code>$('.selector').bind('unselecting', function(event, ui) {
  ...
});</code></pre>
</dd>

    </dl>
  </div>
</li>

    </ul>
  </div>
  <div id="methods">
    <h2 class="top-header">方法</h2>
    <ul class="methods-list">
      
<li class="method" id="method-destroy">
  <div class="method-header">
    <h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
    <dl>
      <dt class="method-signature-label">方法签名:</dt>
        <dd class="method-signature">.selectable( 'destroy' )</dd>
    </dl>
  </div>
  <div class="method-description">
    <p>完全移除selectable功能. 这将使元素返回到之前的初始化状态.</p>
  </div>
</li>


<li class="method" id="method-disable">
  <div class="method-header">
    <h3 class="method-name"><a href="#method-disable">disable</a></h3>
    <dl>
      <dt class="method-signature-label">方法签名:</dt>
        <dd class="method-signature">.selectable( 'disable' )</dd>
    </dl>
  </div>
  <div class="method-description">
    <p>关闭selectable.</p>
  </div>
</li>


<li class="method" id="method-enable">
  <div class="method-header">
    <h3 class="method-name"><a href="#method-enable">enable</a></h3>
    <dl>
      <dt class="method-signature-label">方法签名:</dt>
        <dd class="method-signature">.selectable( 'enable' )</dd>
    </dl>
  </div>
  <div class="method-description">
    <p>打开 selectable.</p>
  </div>
</li>


<li class="method" id="method-option">
  <div class="method-header">
    <h3 class="method-name"><a href="#method-option">option</a></h3>
    <dl>
      <dt class="method-signature-label">方法签名:</dt>
        <dd class="method-signature">.selectable( 'option', optionName, <span class="optional">[</span>value<span class="optional">] </span>)</dd>
    </dl>
  </div>
  <div class="method-description">
    <p>获取或者设置selectable参数. 如果没有提供参数值则是获取.</p>
  </div>
</li>


<li class="method" id="method-refresh">
  <div class="method-header">
    <h3 class="method-name"><a href="#method-refresh">refresh</a></h3>
    <dl>
      <dt class="method-signature-label">方法签名:</dt>
        <dd class="method-signature">.selectable( 'refresh' )</dd>
    </dl>
  </div>
  <div class="method-description">
    <p>刷新每个选择项的位置和大小. 这个方法用来手动重新计算选择项的位置和大小,在autoRefresh设置为false时很有用.</p>
  </div>
</li>


<li class="method" id="method-toggle">
  <div class="method-header">
    <h3 class="method-name"><a href="#method-toggle">toggle</a></h3>
    <dl>
      <dt class="method-signature-label">方法签名:</dt>
        <dd class="method-signature">.selectable( 'toggle' )</dd>
    </dl>
  </div>
  <div class="method-description">
    <p>轮换selectable功能的状态. 这个方法可以启用或者禁用当前选择项的状态.</p>
  </div>
</li>

    </ul>
  </div>
  <div id="theming">
    <h2 class="top-header">主题</h2>
    <p>jQuery UI Selectable插件使用jQuery UI CSS 框架的外观和风格，包括颜色和背景纹理.我们建议您使用ThemeRoller工具来创建和下载的自定义主题，很容易建立和维护.
</p>
  <p>如果有更深层次的个性化需要，有特定类别的工具ui.selectable.css样式可供参考，可以修改这些参考。这些课程是下面以高亮和粗体显示的。
</p>
    
  <h3>jQuery UI CSS Framework classes示例</h3>
  &lt;ul class=&quot;<strong>ui-selectable</strong>&quot;&gt;<br />
&#160;&#160;&#160;&lt;li class=&quot;<strong>ui-selectee</strong>&quot;&gt;&lt;/li&gt;<br />
&#160;&#160;&#160;&lt;li class=&quot;<strong>ui-selectee</strong>&quot;&gt;&lt;/li&gt;<br />
&#160;&#160;&#160;&lt;li class=&quot;<strong>ui-selectee</strong>&quot;&gt;&lt;/li&gt;<br />
&lt;/ul&gt;
  <p class="theme-note">
    <strong>
      Note: 注：这是一个示例selectable插件所产生的标记,而不是你应该使用的标记.创建一个selectable唯一需要的标记是 <br />&lt;ul&gt;<br />
&#160;&#160;&#160;&lt;li&gt;&lt;/li&gt;<br />
&#160;&#160;&#160;&lt;li&gt;&lt;/li&gt;<br />
&#160;&#160;&#160;&lt;li&gt;&lt;/li&gt;<br />
&lt;/ul&gt;.
    </strong>
  </p>

  </div>
</div>

</p><!-- 
Pre-expand include size: 29752 bytes
Post-expand include size: 46743 bytes
Template argument size: 25773 bytes
Maximum: 2097152 bytes
-->

<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3067-1!1!0!!en!2 and timestamp 20090303120117 -->


						<!-- end content -->
		</div>
	</div>
		</div>
				</div><!-- /#primaryContent -->				
			</div><!-- /#content -->
	</div><!-- /#siteContain -->	
	</body>
<!-- Cached 20090303115837 -->
</html>
